﻿using CardPlay.Model.GameModel;
using CardPlay.Model.GameModel.Actions;

namespace CardPlay.DemoPack.Games.FortyThievesVariants
{
    [Game("CCF1BAAC-C1FA-458C-BD1C-05C6CCCCC048", LevelOfDifficulty.Medium, LevelOfSkill.ModerateSkill, DurationOfPlay.MoreThan10Minutes, NumberOfDecks = 2, Family = FamilyName)]
    public class TripleLine : NumberTen
    {
        public TripleLine()
        {
            TotalTableaus = 12;
            TableauDealFormat = "3 up";
            MaximumDeals = 2;
        }

        protected override bool AllowedToBuildEmptyTableau(MovePileAction action)
        {
            return base.AllowedToBuildEmptyTableau(action) && this[Stock].IsEmpty && action.SourcePile.Name == Waste;
        }

        protected override void OnTransactionEnding()
        {
            this.FillEmptyPilesMatching(AnyTableau, this[Stock]);
            //this.FillEmptyPilesMatching(AnyTableau, this[NameOfDealTarget]);
        }
    }
}
